package com.cgtu.cgtucalculator.controller;

import com.cgtu.cgtucalculator.dto.Result;
import com.cgtu.cgtucalculator.util.CanCountable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/transform")
public class TransForm {
    @GetMapping("/{str}")
    public Result<Integer> standardCount(@PathVariable int str){
        return Result.success(str);//.setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData()
    }
    @GetMapping("/test1")
    public Result<String> standardCountTest1(){
        return Result.success("test1");//.setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData()
    }
    @GetMapping("/test2")
    public Result<String> standardCountTest2(){
        return Result.success("test2");//.setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData(CanCountable.transform(str));//.ok().setData()
    }
}